package com.kangye.enterprise.frontdesk.controller;

import com.kangye.enterprise.frontdesk.entity.*;
import com.kangye.enterprise.frontdesk.service.ItemService;
import com.kangye.enterprise.frontdesk.util.ViewJsonObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: enterprise
 * @description: 项目
 * @author: 索腾龙
 * @create: 2021-05-27 15:32
 **/
@RestController
@CrossOrigin
@RequestMapping("/item")
public class ItemController {
    @Autowired
    private ItemService itemService;
    //查询某地区的全部项目(索腾龙)
    @RequestMapping("/selItem")
    public ViewJsonObject<Item> selItem(String regionName){
        //返回Service数据
        return itemService.selItem(regionName);
    }
    //查询项目详细内容1 申报方向(索腾龙)
    @RequestMapping("/selDtdById")
    ViewJsonObject<Dtd> selDtdById(Integer dtdId){
        return itemService.selDtdById(dtdId);
    }
    //查询项目详细内容2 基本信息(索腾龙)
    @RequestMapping("/selItemById")
    ViewJsonObject<Item> selItemById(Integer itemId){
        return itemService.selItemById(itemId);
    }
    //查询项目详细内容3 咨询方式(索腾龙)
    @RequestMapping("/selReferById")
    ViewJsonObject<Refer> selReferById(Integer referId){
        return itemService.selReferById(referId);
    }
    //查询项目详细内容4 流程表(索腾龙)
    @RequestMapping("/selFlowById")
    ViewJsonObject<Flow> selFlowById(Integer flowId){
        return itemService.selFlowById(flowId);
    }
    //查询项目详细内容5 申报材料表(索腾龙)
    @RequestMapping("/selMaterialsById")
    ViewJsonObject<Materials> selMaterialsById(Integer materialsId){
        return itemService.selMaterialsById(materialsId);
    }
}